// JavaScript Document
//type = 0 : Leaner
//type = 1 : Provider
function saveItem(type)
{	// validate
	var f = document.frm_course_leaner;
	if(type==1){
		f = document.frm_course_provider;
	}
	if (remove_space(f.fullname.value) == '')
	{
		$('fullname').focus();
		alert('Vui lòng điền tên.');
		return false;
	}	
	f.submit();
	return true;
}
function remove_space(temp) {
	return temp.replace(/^\s+/, '').replace(/\s+$/, '');
}
function go_home() {
	window.location.href = SITE_URL+'Trang-Chu';
}